import {ApiEnum} from "../../utils/ApiEnum";
import request from '@/utils/AIBaseRequest'

const stream = true
// const model = 'xdeepseekr1'
const model = 'xdeepseekv3'

export const sendMessage = async (message) => {
    if (!message) return;

    const reqParam = {
        stream: true,
        model: 'xdeepseekv3',
        messages: [{ role: 'user', content: message }]
    };

    return  await fetch(ApiEnum.SPARK, {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'Authorization' : 'Bearer sk-nZQlmzPxy4i3KZkZ5720Bc74C59a47DfAb7fDbA227E33203'
        },
        body: JSON.stringify(reqParam)
    });
};